s(x) = x / (1 + abs(x))
c: 90
b: 60
a: 4
segmentbredde = 9.84 (slider from 1 to 20, step 0.01)
segmenthøjde = 20 (slider from 1 to 30, step 0.01)
vstart: atand(segmenthøjde / segmentbredde)
R: sqrt(segmentbredde^(2) + segmenthøjde^(2)) / 2
startsted = -13.37 (slider from -25 to 0, step 0.01)
segmentdybde = 0.54 (slider from 0 to 1, step 0.001)
Ax(j) = (j * segmentdybde) + startsted
deltav = 0.08918632477691024 rad (slider from 0 to 0.17453292519943295, step 0.01°)
maxsegmentantal = 60 (slider from 0 to 100, step 1)
f(x) = (c / ((2 * s(a))) * s((((x - b / 2) * 2) * a / b))) + c / 2
Ay(j) = (R * cos((f(j))° + vstart))
Az(j) = (R * sin((f(j))° + vstart))
By(j) = (R * cos((f(j))° + 180° - vstart))
Bx(j) = (j * segmentdybde) + startsted
Bz(j) = (R * sin((f(j))° + 180° - vstart))
Cy(j) = (R * cos((f(j))° + 180° - vstart))
Cx(j) = ((j + 1) * segmentdybde) + startsted
Cz(j) = (R * sin((f(j))° + 180° - vstart))
Dx(j) = ((j + 1) * segmentdybde) + startsted
Dy: Ay(j)
Dz: Az(j)
j = 83 (slider from 0 to 150, step 1)
A1: Ax(j)
A2: Bx(j)
A3: Cx(j)
A4: Dx(j)
tag = Sequence(Polygon[(Ax(j), Ay(j), Az(j)), (Bx(j), By(j), Bz(j)), (Cx(j), Cy(j), Cz(j)), (Dx(j), Dy(j), Dz(j))], j, 0, maxsegmentantal, 1)
bund = Sequence(Polygon[(Ax(j), (-Ay(j)), (-Az(j))), (Bx(j), (-By(j)), (-Bz(j))), (Cx(j), (-Cy(j)), (-Cz(j))), (Dx(j), (-Dy(j)), (-Dz(j)))], j, 0, maxsegmentantal, 1)
A11: Cx(j)
Ey(j) = (R * cos((f(j))° + vstart + 180°))
Ez(j) = (R * sin((f(j))° + vstart + 180°))
Fx(j) = Ax(j + 1)
Fy(j) = (R * cos((f(j))° + vstart + 180°))
Fz(j) = (R * sin((f(j))° + vstart + 180°))
Ex(j) = (j * segmentdybde) + startsted
side1 = Sequence(Polygon[(Bx(j), By(j), Bz(j)), (Ex(j), Ey(j), Ez(j)), (Fx(j), Fy(j), Fz(j)), (Cx(j), Cy(j), Cz(j))], j, 0, maxsegmentantal)
side2 = Sequence(Polygon[(Bx(j), (-By(j)), (-Bz(j))), (Ex(j), (-Ey(j)), (-Ez(j))), (Fx(j), (-Fy(j)), (-Fz(j))), (Cx(j), (-Cy(j)), (-Cz(j)))], j, 0, maxsegmentantal)
endelængde = 34.4 (slider from -5 to 100)
side1start = Sequence(Polygon[(Bx((-j)), By(0), Bz(0)), (Ex((-j)), Ey(0), Ez(0)), (Fx((-j)), Fy(0), Fz(0)), (Cx((-j)), Cy(0), Cz(0))], j, 1, endelængde)
side2start = Sequence(Polygon[(Bx((-j)), (-By(0)), (-Bz(0))), (Ex((-j)), (-Ey(0)), (-Ez(0))), (Fx((-j)), (-Fy(0)), (-Fz(0))), (Cx((-j)), (-Cy(0)), (-Cz(0)))], j, 1, endelængde)
tagstart = Sequence(Polygon[(Ax((-j)), Ay(0), Az(0)), (Bx((-j)), By(0), Bz(0)), (Cx((-j)), Cy(0), Cz(0)), (Dx((-j)), Dy(0), Dz(0))], j, 1, endelængde, 1)
bundstart = Sequence(Polygon[(Ax((-j)), (-Ay(0)), (-Az(0))), (Bx((-j)), (-By(0)), (-Bz(0))), (Cx((-j)), (-Cy(0)), (-Cz(0))), (Dx((-j)), (-Dy(0)), (-Dz(0)))], j, 1, endelængde, 1)
tagslut = Sequence(Polygon[(Ax(j + maxsegmentantal), Ay(maxsegmentantal), Az(maxsegmentantal)), (Bx(j + maxsegmentantal), By(maxsegmentantal), Bz(maxsegmentantal)), (Cx(j + maxsegmentantal), Cy(maxsegmentantal), Cz(maxsegmentantal)), (Dx(j + maxsegmentantal), Dy(maxsegmentantal), Dz(maxsegmentantal))], j, 1, endelængde, 1)
bundslut = Sequence(Polygon[(Ax(j + maxsegmentantal), (-Ay(maxsegmentantal)), (-Az(maxsegmentantal))), (Bx(j + maxsegmentantal), (-By(maxsegmentantal)), (-Bz(maxsegmentantal))), (Cx(j + maxsegmentantal), (-Cy(maxsegmentantal)), (-Cz(maxsegmentantal))), (Dx(j + maxsegmentantal), (-Dy(maxsegmentantal)), (-Dz(maxsegmentantal)))], j, 1, endelængde, 1)
side1slut = Sequence(Polygon[(Bx(j + maxsegmentantal), By(maxsegmentantal), Bz(maxsegmentantal)), (Ex(j + maxsegmentantal), Ey(maxsegmentantal), Ez(maxsegmentantal)), (Fx(j + maxsegmentantal), Fy(maxsegmentantal), Fz(maxsegmentantal)), (Cx(j + maxsegmentantal), Cy(maxsegmentantal), Cz(maxsegmentantal))], j, 1, endelængde, 1)
side2slut = Sequence(Polygon[(Bx(j + maxsegmentantal), (-By(maxsegmentantal)), (-Bz(maxsegmentantal))), (Ex(j + maxsegmentantal), (-Ey(maxsegmentantal)), (-Ez(maxsegmentantal))), (Fx(j + maxsegmentantal), (-Fy(maxsegmentantal)), (-Fz(maxsegmentantal))), (Cx(j + maxsegmentantal), (-Cy(maxsegmentantal)), (-Cz(maxsegmentantal)))], j, 1, endelængde, 1)